﻿@using com.hyrentals.webcommon.extensions
@using com.hyrentals.webportal.Config
@using com.hyrentals.data

@model com.hyrentals.data.RV
@{
    Html.AddStyle("css/rv");
    Html.AddTailScript("js/uploadify/swfobject");
    Html.AddTailScript("js/uploadify/jquery.uploadify.v2.1.4");
    Html.AddTailScript("js/rv-common");
    Html.AddTailScript("js/rv-photos");
    Html.AddJSConfig("RVId", Model.Id, true);

    string calendarUrl = string.Format("/rv/{0}/edit/calendar", Model.Id);
    string pricingUrl = string.Format("/rv/{0}/edit/pricing", Model.Id);
    string overviewUrl = string.Format("/rv/{0}/edit/overview", Model.Id);
    string automotiveUrl = string.Format("/rv/{0}/edit/automotive", Model.Id);
    string interiorUrl = string.Format("/rv/{0}/edit/interior", Model.Id);
    string photosUrl = string.Format("/rv/{0}/edit/photos", Model.Id);
    string addressUrl = string.Format("/rv/{0}/edit/address", Model.Id);

    IEnumerable<Photo> photos = ViewBag.Photos;
}

<div class="layout-primary">
    <div class="layout-primary-left">
        <ul class="manage-rv-nav">
            <li><a href="@calendarUrl">Calendar</a></li>
            <li><a href="@pricingUrl">Pricing</a></li>
            <li><a href="@overviewUrl">Overview</a></li>
            <li><a href="@automotiveUrl">RV Details</a></li>
            <li><a class="active"href="@photosUrl">Photos</a></li>
            <li><a href="@addressUrl">Address</a></li>
        </ul>
    </div>
    <div class="layout-primary-middle">
        <div class="upload-region clearfix">
            <div class="upload-btn">
                <input id="photo_upload"  type="file" name="upload" style="display: none;"/>
            </div>
            <div id="uploader_queue" class="uploader-queue"></div>
        </div>
        <ul id="photo_list" class="photo-list clearfix">
        @foreach (Photo photo in photos)
        {
           @Html.Partial("w_Photo", photo)
        }
        </ul>
    </div>
    <div class="layout-primary-right"></div>
</div>